The legacy HTTP entry point for Xend remote access didn't hook the
authorEwan Mellor <ewan@xensource.com>
Tue, 21 Nov 2006 17:34:17 +0000 (17:34 +0000)
committerEwan Mellor <ewan@xensource.com>
Tue, 21 Nov 2006 17:34:17 +0000 (17:34 +0000)
dump operation for a domain, this patch adds it.

Signed-off-by: Daniel Veillard <veillard@redhat.com>
tools/python/xen/xend/server/SrvDomain.py

index 52075340fddc37a906886a48deed89edf7ccd718..82998e4d9892c1dde645c30e90ea529bbe471a6a 100644 (file)
@@ -82,6 +82,18 @@ class SrvDomain(SrvDir):
     def do_save(self, _, req):
         return self.xd.domain_save(self.dom.domid, req.args['file'][0])
 
+    def op_dump(self, op, req):
+        self.acceptCommand(req)
+        return req.threadRequest(self.do_dump, op, req)
+
+    def do_dump(self, _, req):
+        fn = FormFn(self.xd.domain_dump,
+                   [['dom',         'int'],
+                    ['file',        'str'],
+                    ['live',        'int'],
+                    ['crash',       'int']])
+        return fn(req.args, {'dom': self.dom.domid})
+
     def op_migrate(self, op, req):
         return req.threadRequest(self.do_migrate, op, req)